﻿<Grid x:Class="TouchExplorer.Controls.FilesTiles"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:ctrls="clr-namespace:TouchControls;assembly=TouchControls"
      xmlns:TouchExplorer="clr-namespace:TouchExplorer" xmlns:Controls="clr-namespace:TouchExplorer.Controls"
      mc:Ignorable="d"       
      d:DesignHeight="300"
      d:DesignWidth="300">
    <Grid.Resources>
        <DataTemplate x:Key="FileItemTemplate">
            <Controls:TouchFileDisplayTiles />
        </DataTemplate>
    </Grid.Resources>

    <ctrls:TouchListBox
            x:Name="ListFiles"
            BorderThickness="0" ItemsSource="{Binding Files}" 
            HorizontalContentAlignment="Stretch"        
            ItemTemplate="{StaticResource FileItemTemplate}"        
            >
        <ctrls:TouchListBox.Style>
            <Style TargetType="{x:Type ctrls:TouchListBox }">
                <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled" />
                <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Visible" />
                <!--<Setter Property="ScrollViewer.CanContentScroll" Value="True" />-->

                <Setter Property="ItemsPanel">
                    <Setter.Value>
                        <ItemsPanelTemplate>
                            <VirtualizingStackPanel Orientation="Horizontal" />
                        </ItemsPanelTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </ctrls:TouchListBox.Style>

    </ctrls:TouchListBox>
</Grid>
